<?if ($error):?>
<div id="message" class="error fade"><p><strong><?=$error?></strong></p></div>
<?elseif ($message):?>
<div id="message" class="updated fade"><p><strong><?=$message?></strong></p></div>
<?endif;?>

<div class="wrap">
<h2 id="write-post">Xanga Crosspost Configuration</h2>

<div  style="float:right;width:250px;background:#eee;padding:10px;font-size:0.9em;">
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
If you find this plugin helpful, please consider donating a few dollars to support this plugin. Thanks!
<br /><br />
<input type="hidden" name="cmd" value="_s-xclick">
<input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but04.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
<input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----MIIHRwYJKoZIhvcNAQcEoIIHODCCBzQCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYBkW0XfGZbagp/PWqgvKh7s4nD3xMUnnv9i84qO8o/3ZUT4X/rZsZZ/2v0KF1iViatR7woW9g/rXc+jR4ZxRiMsfV3uJogRj9UPq0x31XVfhk+XmBwwJQNryzEDKmgTQz1+XBxIU3FO8cHn2VmFt5WDHbCndOWMxAEi/xl/JS2XwjELMAkGBSsOAwIaBQAwgcQGCSqGSIb3DQEHATAUBggqhkiG9w0DBwQIfghXYl7K5LGAgaCAdm2TDmA02p48jumOq0PHluOtlno3YSlY854r1TvzBJsh8IwXsKIWfvyG2XoDmp/398/bpKD+LYLsy30yHPbgJoKq16QHCfw6kMIOaidrkNixIf2a4u3w+nnPNMvNZRP7+gMsaBGvTZ9yZ9smhRGDgBqpHZvV38Rl0JF69yl5BxhWAp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AQUFAAOBgQCBXzpWmoBa5e9fo6ujionW1hUhPkOBakTr3YCDjbYfvJEiv/2P+IobhOGJr85+XHhN0v4gUkEDI8r2/rNk1m0GA8HKddvTjyGw/XqXa+LSTlDYkqI8OwR8GEYj4efEtcRpRYBxV8KxAW93YDWzFGvruKnnLbDAF6VR5w/cCMn5hzGCAZowggGWAgEBMIGUMIGOMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxFDASBgNVBAoTC1BheVBhbCBJbmMuMRMwEQYDVQQLFApsaXZlX2NlcnRzMREwDwYDVQQDFAhsaXZlX2FwaTEcMBoGCSqGSIb3DQEJARYNcmVAcGF5cGFsLmNvbQIBADAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0BCQUxDxcNMDUxMjA3MDIzMTM1WjAjBgkqhkiG9w0BCQQxFgQU/EtXLlgTwKepwiUAKUMtHtwNVl8wDQYJKoZIhvcNAQEBBQAEgYBhIbCW+2saICynd5IbBMO1Ykr0vTDav1gO7FF8jermCkGcvoxLmOQOOXpKH9VPHj3a56SP8xS27lzbDvZ8TPFvcv0Afd7gGtjWYG1QkuKqs78ARtzIbSPuVngCqriAq4rZteJjWvMh4NIoL4qzXiOXdw5VId+QLUf0yVy2KLGIbw==-----END PKCS7-----">

</form>
</div>
<p>This plugin will crosspost your WordPress blog entries over to your Xanga account. 
</p>
<p>
<b>Installation:</b> Just enter your Xanga username and password to link your blog to your Xanga account.
Once that is done, this plugin will take what you posted and crosspost it to your linked Xanga. That's pretty much it.
</p>

<p>
This plugin is provided and licensed free of charge for you to use under the GPL.
</p>
<p>
Check the following pages for the latest updates to this plugin, along with any technical support:<br>
<br>
<strong>Releases:</strong> <a href="http://tantannoodles.com/toolkit/xanga-crosspost/">tantannoodles.com/toolkit/xanga-crosspost/</a><br>
<strong>Support Group:</strong> <a href="http://groups.google.com/group/tantan-wordpress-xanga-crosspost">groups.google.com/group/tantan-wordpress-xanga-crosspost</a>
</p>
<p>
<strong>RSS Updates:</strong> Subscribe to the <a href="http://feeds.feedburner.com/TanTanToolkit">TanTanToolkit feed</a> and get notified when there's an update to this plugin.
</p>



<table width="100%" cellspacing="2" cellpadding="5" class="editform"> 

<?php if (!$session):?>
<form method="post">
<input type="hidden" name="action" value="login" />
<tr>
<th width="33%" scope="row">Username:</th> 
<td>
<input type="text" name="user"  value="<?php echo $_POST['user']?>" />
</td>
</tr>
<tr>
<th width="33%" scope="row">Password:</th> 
<td>
<input type="password" name="password"  value="" /> 
<input type="submit" value="login &gt;" />
</td>
</tr>
</form>

<?php else:?>
<form method="post">
<input type="hidden" name="action" value="logout" />
<tr valign="top">
<th width="33%" scope="row">Xanga User:</th> 
<td><a href="http://www.xanga.com/<?php echo $user?>" target="_blank"><?php echo $user?></a> <input type="submit" value="remove link" /><br />
<small>Your blog is currently linked to this Xanga user</small>
</td>
</tr>
</form>
<form method="post">
<input type="hidden" name="action" value="save" />
<tr valign="top">
<th width="33%" scope="row">Premium Account:</th> 
<td><input type="checkbox" name="options[premium]" value="1" <?php echo ($options['premium'] ? 'checked="checked"' : ''); ?> />
Check if you have a premium Xanga account.
</td>
</tr>
<tr valign="top">
<th width="33%" scope="row">Enable Comments:</th> 
<td><input type="checkbox" name="options[comments]" value="1" <?php echo ($options['comments'] ? 'checked="checked"' : ''); ?> />
Allow comments on Xanga posts.
</td>
</tr>
<?php
$mode = ($options['publish_mode'] != 'restrict') ? 'all' : '';
?>
<tr valign="top">
<th width="33%" scope="row">Crosspost Categories:</th> 
<td>
    <input type="radio" name="options[publish_mode]" onclick="document.getElementById('xanga-cats').style.display='none';" value="" <?php echo ($mode ? 'checked="checked"' : '');?> /> All categories<br />
    <input type="radio" name="options[publish_mode]" onclick="document.getElementById('xanga-cats').style.display='block';" value="restrict" <?php echo (!$mode ? 'checked="checked"' : '');?> /> Only the following categories...<br />
<div id="xanga-cats" style="margin:5px 0 0 1.5em;display:<?php echo ($mode ? 'none' : 'block');?>">
    <?php foreach ($categories as $cat):?>
        <input type="checkbox" name="options[category][<?php echo $cat->cat_ID; ?>]" value="1" <?php echo (((is_array($options['category']) && $options['category'][$cat->cat_ID]) || $mode) ? 'checked="checked"' : '')?>><?php echo $cat->cat_name; ?></option><br />
    <?php endforeach;?>

<small>Only posts in the following category will be posted to your Xanga</small>
</div>
</td>

</tr>

<tr><td colspan="2">
<p class="submit">
<input type="submit" value="save settings &gt;" />
</p>
</td></tr>
</form>
<?php endif; ?>

</table>

</div>
